package com.example.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.Result.Result;
import com.example.service.OrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/order")
public class orderController {

    @Autowired
    private OrderDetailService orderDetailService;

    @GetMapping("/page")
    public Result<Page> getAll(int page, int pageSize) {
        Page pageInfo = new Page(page,pageSize);
//        分页查询
        orderDetailService.page(pageInfo);
        return Result.success(pageInfo);
//        return null;
    }
}
